//
//  FZHomeCollectionViewSectionFooterView.m
//  EnglishTalk
//
//  Created by CyonLeuMBP on 2016/10/15.
//  Copyright © 2016年 Feizhu Tech. All rights reserved.
//

#import "FZHomeCollectionViewSectionFooterView.h"

@implementation FZHomeCollectionViewSectionFooterView

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    FZStyleSheet *css = [FZStyleSheet currentStyleSheet];
    self.topSeperatorView.backgroundColor = css.color_7;
    self.midSeperatorView.backgroundColor = css.color_7;
    self.bottomGrayView.backgroundColor = css.color_9;
    
    self.moreButton.tintColor = self.refreshButton.tintColor = css.color_1;
    self.moreButton.layoutDirection = self.refreshButton.layoutDirection = FZDirectionButtonLayoutHorizontalImageRight;
    
    [self.moreButton setImage:[UIImage imageNamed:@"public_icon_more"] forState:UIControlStateNormal];
    [self.refreshButton setImage:[UIImage imageNamed:@"my_icon_change"] forState:UIControlStateNormal];

    self.moreButton.titleLabel.font = self.refreshButton.titleLabel.font = css.fontOfH3;
    
    [self.moreButton setTitleColor:css.color_1 forState:UIControlStateNormal];
    [self.refreshButton setTitleColor:css.color_1 forState:UIControlStateNormal];
}

- (void)setHideContentView:(BOOL)hideContentView {
    _hideContentView = hideContentView;
    
    self.contentBgView.hidden = hideContentView;
}


- (IBAction)onMoreButtonAction:(id)sender {
    if (self.touchMoreButtonBlock) {
        self.touchMoreButtonBlock(self.indexPath, self.module, self.identifier);
    }
}

- (IBAction)onRefreshButtonAction:(id)sender {
    if (self.touchRefreshButtonBlock) {
        self.touchRefreshButtonBlock(self.indexPath, self.module, self.identifier);
    }
}


@end
